package com.neu.service.impl;

import com.neu.dao.DoctorDao;
import com.neu.po.Doctor;
import com.neu.service.DoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class DoctorServiceImpl implements DoctorService {

    @Autowired
    DoctorDao doctorDao;

    @Override
    public List<Doctor> selectAll() {
        List<Doctor> list = doctorDao.selectAll();
        return list;
    }

    @Override
    public List<Doctor> selectList(String where, Map<String, Object> map) {
        List<Doctor> list = doctorDao.selectList(where,map);
        return list;
    }

    @Override
    public int update(Doctor doctor) {
        int len = doctorDao.update(doctor);
        return len;
    }

    @Override
    public Doctor selectById(int id) {
        Doctor doctor = doctorDao.selectById(id);
        return doctor;
    }
}
